package com.hdax.dm.api.item.controller;

import com.hdax.dm.api.item.ItemCommentControllerApi;
import com.hdax.dm.entity.item.Item;
import com.hdax.dm.entity.item.ItemComment;
import com.hdax.dm.service.ItemCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ItemCommentController implements ItemCommentControllerApi {

    @Autowired
    private ItemCommentService itemCommentService;

    @Override
    public List<ItemComment> getComments(Long id) {
        return itemCommentService.getComments(id);
    }

    @Override
    public boolean addComments(ItemComment itemComme) {
        return itemCommentService.addComments(itemComme);
    }
}
